﻿@model blacksoft.Models.Incidente
@using blacksoft.Helpers
@{
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
    ViewBag.Title = "Incidentes";
}

@if (TempData["edit"] != null)
{
    <div class="error grid_12">
        <h3>Error: @TempData["edit"]</h3>
        <a class="hide_btn" href="#"></a>
    </div>
}
else if (TempData["index"] != null)
{
    <div class="error grid_12">
        <h3>Error: @TempData["index"]</h3>
        <a class="hide_btn" href="#"></a>
    </div>
}

<div class="block big">
    <div class="titlebar">
        <h3>Modificar Incidente</h3>
    </div>
    <div class="block_cont">
        @using (Html.BeginForm())
        {
            @Html.AntiForgeryToken()

            <div class="form">
                @Html.ValidationSummary(true)
                @Html.HiddenFor(model => model.IDIncidente)

                <div class="form-row">
                    @Html.LabelForRequired(model => model.IDProgramacionViaje)
                    @Html.DropDownList("IDProgramacionViaje", null, String.Empty, new { @class = "select" })
                    @Html.ValidationMessageFor(model => model.IDProgramacionViaje)
                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.IDPersona)
                    @Html.DropDownList("IDPersona", null, String.Empty, new { @class = "select" })
                    @Html.ValidationMessageFor(model => model.IDPersona)
                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.Lugar)
                    @Html.TextBoxFor(model => model.Lugar, null, new { @class = "text-box single-line", style = "width: 400px;" })
                    @Html.ValidationMessageFor(model => model.Lugar)
                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.Descripcion)
                    @Html.TextAreaFor(model => model.Descripcion, new { @class = "text-box single-line", style = "width: 400px; height: 150px; resize:none" })
                    @Html.ValidationMessageFor(model => model.Descripcion)
                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.AccionTomada)
                    @Html.TextAreaFor(model => model.AccionTomada, new { @class = "text-box single-line", style = "width: 400px; height: 150px; resize:none" })
                    @Html.ValidationMessageFor(model => model.AccionTomada)
                </div>

                <div class="form-row">
                    @Html.LabelForRequired(model => model.Fecha)
                    @Html.EditorFor(model => model.Fecha)
                    @Html.ValidationMessageFor(model => model.Fecha)
                </div>

                <br />
                <div class="form-row">
                    <input type="submit" value="Registrar" class="btn btn-default" />
                    <br />
                    @Html.ActionLink("Regresar al listado", "Index")
                </div>
            </div>
        }

    </div>
</div>
